import {Component} from "react"
import {fn1,fn2,fn3} from "../../utils/tools "

export const withRouter = (SouceCom)=>{

  class NewCom extends Component {

    componentDidMount(){
      fn1();
      fn2();
    }

    componentDidUpdate(){
      fn3();
    }

    render() {
      return (
       <SouceCom a="1" b="2" {...this.props} ></SouceCom>
      )
    }
  }
  

  return  NewCom
}

